defer replies in counter commands
This commit is contained in:
parent
f11c7681f0
commit
7890d44482
|
@ -15,6 +15,7 @@ module.exports = {
|
|||
),
|
||||
|
||||
execute: async (interaction: CommandInteraction, member: GuildMember) => {
|
||||
await interaction.deferReply({ephemeral: true});
|
||||
const amount = Math.trunc(interaction.options.getNumber('amount') || 1);
|
||||
changeCounterInteraction(interaction, member, -amount);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ module.exports = {
|
|||
),
|
||||
|
||||
execute: async (interaction: CommandInteraction, member: GuildMember) => {
|
||||
await interaction.deferReply({ephemeral: true});
|
||||
const amount = Math.trunc(interaction.options.getNumber('amount') || 1);
|
||||
changeCounterInteraction(interaction, member, amount);
|
||||
}
|
||||
|
|
|
@ -83,8 +83,7 @@ export async function changeCounterInteraction(interaction: CommandInteraction,
|
|||
const newCount = await changeCounter(amount);
|
||||
await updateCounter(interaction.client);
|
||||
await announceCounterUpdate(interaction.client, member, amount);
|
||||
interaction.reply({
|
||||
content: `${EMOJI} **You have ${amount > 0 ? 'increased' : 'decreased'} the counter.**\n\`\`\`diff\n ${newCount - amount}\n${getSign(amount)}${Math.abs(amount)}\n ${newCount}\`\`\``,
|
||||
ephemeral: true
|
||||
interaction.followUp({
|
||||
content: `${EMOJI} **You have ${amount > 0 ? 'increased' : 'decreased'} the counter.**\n\`\`\`diff\n ${newCount - amount}\n${getSign(amount)}${Math.abs(amount)}\n ${newCount}\`\`\``
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue