mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
Merge pull request #117 from mariusbegby/interaction-not-replied
fix: Possibly fix interaction not reply errors
This commit is contained in:
1 file changed
+21
-9
@@ -56,15 +56,27 @@ module.exports = {
|
|||||||
`[Shard ${interaction.guild.shardId}] Guild ${interaction.guild.id}> Command '${interaction}' failed to execute.`
|
`[Shard ${interaction.guild.shardId}] Guild ${interaction.guild.id}> Command '${interaction}' failed to execute.`
|
||||||
);
|
);
|
||||||
|
|
||||||
await interaction.followUp({
|
if (interaction.replied) {
|
||||||
embeds: [
|
await interaction.followUp({
|
||||||
new EmbedBuilder()
|
embeds: [
|
||||||
.setDescription(
|
new EmbedBuilder()
|
||||||
`**${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})**._`
|
.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)
|
)
|
||||||
]
|
.setColor(embedOptions.colors.error)
|
||||||
});
|
]
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
await interaction.editReply({
|
||||||
|
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