Skip to content

Commit

Permalink
Create new row if count is reached
Browse files Browse the repository at this point in the history
  • Loading branch information
FeroxFoxxo committed Oct 22, 2023
1 parent 4331a1f commit 3243469
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/Role Reactions/Commands/AddAssignedRole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ await RespondInteraction($"Role menu `{menu.Name}` does not have a message relat
tempComp.Add(storeRole.Key, storeRole.Value);

if (tempComp.Count >= 5)
{
rows.Add(tempComp);
tempComp = [];
}

count++;
}
Expand Down
3 changes: 3 additions & 0 deletions backend/Role Reactions/Commands/RemoveAssignedRole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ await RespondInteraction($"Role menu `{menu.Name}` does not have a message relat
tempComp.Add(storeRole.Key, storeRole.Value);

if (tempComp.Count >= 5)
{
rows.Add(tempComp);
tempComp = [];
}
}

rows.Add(tempComp);
Expand Down

0 comments on commit 3243469

Please sign in to comment.