fix bot crash on bot response with only text
This commit is contained in:
15 files changed
+20
-20
No files matched your search
+3
-3
@@ -29,7 +29,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
}
|
||||
|
||||
const actionEmbed = new EmbedBuilder()
|
||||
@@ -50,9 +50,9 @@ module.exports = {
|
||||
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({ content: `<@${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');
|
||||
return interaction.send({ content: 'Action performed' });
|
||||
} else {
|
||||
return interaction.send({ content: 'Action performed', embeds: [actionEmbed] });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user