Use the built-in defer reply method
This commit is contained in:
@ -85,13 +85,13 @@ async function execute(interaction) {
|
||||
}
|
||||
}
|
||||
|
||||
const mapValidatePromise = validateMapAsset(id, game);
|
||||
// Show "Bot is thinking..."
|
||||
await interaction.deferReply();
|
||||
|
||||
const message = await interaction.reply("⌛ Validating map...");
|
||||
|
||||
const validation = await mapValidatePromise;
|
||||
// Validate and send the validation result
|
||||
const validation = await validateMapAsset(id, game);
|
||||
const msg = getValidationMessage(validation, game, true);
|
||||
await message.edit(msg);
|
||||
await interaction.editReply(msg);
|
||||
|
||||
if (!validation.valid) {
|
||||
await interaction.followUp("Due to having problems, your map was **NOT submitted**.");
|
||||
|
Reference in New Issue
Block a user