Skip to content

Commit

Permalink
Slice to 25 errors at most just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddy committed Aug 21, 2023
1 parent 3d5b4e0 commit 0d6d1b3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/commands/ReactionRoleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,12 @@ export class ReactionRoleCommand extends Subcommand {
const embed = new EmbedBuilder()
.setTitle("Reaction role verification")
.addFields(
...Array.from(errors).map((error, index) => ({
name: `Error ${index + 1}`,
value: error,
})),
...Array.from(errors)
.map((error, index) => ({
name: `Error ${index + 1}`,
value: error,
}))
.slice(0, 25),
)
.setColor(BOT_EMBED_COLOR)

Expand Down

0 comments on commit 0d6d1b3

Please sign in to comment.