mirror of
https://github.com/nx-bat/discordbot-ng.git
synced 2026-11-11 07:13:37 -05:00
(buttons): Bug-testing round 1.
This commit is contained in:
@@ -25,7 +25,7 @@ class CloseTicketButton implements Button<Client> {
|
||||
|
||||
await channel.send(`This ticket has been closed by ${interaction.user}`);
|
||||
|
||||
await interaction.reply({ flags: [MessageFlags.Ephemeral], content: 'Ticket closed.' });
|
||||
await interaction.editReply({ content: 'Ticket closed.' });
|
||||
|
||||
await channel.edit({
|
||||
archived: true,
|
||||
|
||||
@@ -42,9 +42,9 @@ class UnclaimTicketButton implements Button<Client> {
|
||||
components: [row]
|
||||
});
|
||||
|
||||
await interaction.reply({ content: 'Ticket unclaimed.', flags: [MessageFlags.Ephemeral] });
|
||||
await interaction.editReply({ content: 'Ticket unclaimed.' });
|
||||
} catch (error: Error | any) {
|
||||
|
||||
await interaction.editReply({ content: error.message }).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ export default {
|
||||
const moderatorChannel = interaction.options.getChannel('moderator-channel');
|
||||
if (moderatorChannel) {
|
||||
await Database.updateSettings(interaction.guildId, 'moderator_channel_id', moderatorChannel.id);
|
||||
response.push(`**moderator_channel_id** has been set to": ${moderatorChannel}.`);
|
||||
response.push(`**moderator_channel_id** has been set to: ${moderatorChannel}.`);
|
||||
}
|
||||
|
||||
const adminRole = interaction.options.getRole('admin-role');
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ client.on('interactionCreate', async (interaction) => {
|
||||
for (const button of buttons) {
|
||||
if (button.id != id) continue;
|
||||
|
||||
Promise.resolve((button.execute as (context: Client, ...args: unknown[]) => Promise<void>)(client, ...interaction.customId.split('_').slice(1))
|
||||
Promise.resolve((button.execute as (context: Client, ...args: unknown[]) => Promise<void>)(client, interaction, ...interaction.customId.split('_').slice(1))
|
||||
.catch(e => console.error('An error occurred while handling a button interaction: ', e)));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user