mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Fix various bugs, update djs
This commit is contained in:
parent
4d1924b1ec
commit
dda19de6e6
31 changed files with 96 additions and 72 deletions
|
@ -13,12 +13,12 @@ export async function waitForButtonConfirm(
|
|||
new MessageButton()
|
||||
.setStyle("SUCCESS")
|
||||
.setLabel(options?.confirmText || "Confirm")
|
||||
.setCustomID(`confirmButton:${idMod}`),
|
||||
.setCustomId(`confirmButton:${idMod}`),
|
||||
|
||||
new MessageButton()
|
||||
.setStyle("DANGER")
|
||||
.setLabel(options?.cancelText || "Cancel")
|
||||
.setCustomID(`cancelButton:${idMod}`),
|
||||
.setCustomId(`cancelButton:${idMod}`),
|
||||
]);
|
||||
const message = await channel.send({ ...toPost, components: [row] });
|
||||
|
||||
|
@ -29,10 +29,10 @@ export async function waitForButtonConfirm(
|
|||
if (options?.restrictToId && options.restrictToId !== interaction.user.id) {
|
||||
interaction.reply({ content: `You are not permitted to use these buttons.`, ephemeral: true });
|
||||
} else {
|
||||
if (interaction.customID === `confirmButton:${idMod}`) {
|
||||
if (interaction.customId === `confirmButton:${idMod}`) {
|
||||
message.delete();
|
||||
resolve(true);
|
||||
} else if (interaction.customID === `cancelButton:${idMod}`) {
|
||||
} else if (interaction.customId === `cancelButton:${idMod}`) {
|
||||
message.delete();
|
||||
resolve(false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue