better error handling
This commit is contained in:
4 files changed
+21
-5
No files matched your search
+5
-1
@@ -157,7 +157,11 @@ module.exports = {
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
}
|
||||
channel.send({ content: `<@&${GuildDB.dispatcherRole}> New 911 call!`, embeds: [embed911], components: [opt] });
|
||||
try {
|
||||
channel.send({ content: `<@&${GuildDB.dispatcherRole}> New 911 call!`, embeds: [embed911], components: [opt] });
|
||||
} 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('911 Alerted!');
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user