Skip to content

Commit

Permalink
fix(InteractionsSelfRoleManager): revert custom id changes for buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinaël Devresse committed Sep 18, 2024
1 parent d0c0a8f commit 72f1f09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
"start": "yarn build && tsc ./examples/index.ts --target esnext --module nodenext --moduleResolution nodenext && node ./examples/index.js"
},
"type": "module",
"version": "4.0.3"
"version": "4.0.4"
}
4 changes: 2 additions & 2 deletions src/InteractionsSelfRoleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ export class InteractionsSelfRoleManager extends SelfRoleManager {
)
.map((rteData: RoleToEmojiData[]) =>
new ActionRowBuilder<ButtonBuilder>().addComponents(
...rteData.map((rte: RoleToEmojiData, index: number) =>
...rteData.map((rte: RoleToEmojiData) =>
new ButtonBuilder()
.setEmoji(rte.emoji.toString())
.setCustomId(
`${packagePrefix}${buttonPrefix}${roles[index]?.id ?? rte.role.toString()}`,
`${packagePrefix}${buttonPrefix}${rte.role instanceof Role ? rte.role.id : rte.role}`,
)
.setStyle(ButtonStyle.Secondary),
),
Expand Down

0 comments on commit 72f1f09

Please sign in to comment.