better error handling

This commit is contained in:
SowinskiBraeden committed 2022-08-05 15:34:01 -07:00
1 parent 2aa052b2e2
commit c6ba35796f
4 files changed
+21 -5

No files matched your search

+5 -1
View File
@@ -46,7 +46,11 @@ module.exports = {
return interaction.send({ embeds: [embed] });
}
channel.send({ embeds: [actionEmbed] });
try {
channel.send({ embeds: [actionEmbed] });
} catch (err) {
return interaction.send(`<@${client.user.id}> Does not have permissions to send to the channel.\nMake sure your admins give <@${client.user.id}> access to all channels required. `)
}
return interaction.send('Action performed');
} else {
return interaction.send({ content: 'Action performed', embeds: [actionEmbed] });