better error handling
This commit is contained in:
4 files changed
+21
-5
No files matched your search
+5
-1
@@ -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] });
|
||||
|
||||
Reference in new issue
Block a user