mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 22:16:13 +00:00
fix: Additional handling of autocomplete interaction errors
This commit is contained in:
1 parent
412116b4d7
commit
524b4d2f30
2 files changed
+15
-1
No files matched your search
@@ -41,6 +41,10 @@ module.exports = {
|
||||
value: track.url
|
||||
}));
|
||||
|
||||
if (!interaction.isRepliable() || interaction.responded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
return interaction.respond(response);
|
||||
},
|
||||
execute: async ({ interaction }) => {
|
||||
|
||||
@@ -66,7 +66,7 @@ module.exports = {
|
||||
.setColor(embedOptions.colors.error)
|
||||
]
|
||||
});
|
||||
} else {
|
||||
} else if (interaction.deferred) {
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
@@ -76,6 +76,16 @@ module.exports = {
|
||||
.setColor(embedOptions.colors.error)
|
||||
]
|
||||
});
|
||||
} else {
|
||||
await interaction.reply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedOptions.icons.error} Uh-oh... _Something_ went wrong!**\nThere was an unexpected error while trying to execute this command.\n\nYou can try to perform the command again.\n\n_If this problem persists, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(embedOptions.colors.error)
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user