add missing data check
This commit is contained in:
3 files changed
+4
-4
No files matched your search
+2
-2
@@ -21,9 +21,9 @@ module.exports = {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
}
|
||||
|
||||
|
||||
let guild = await client.dbo.collection("prefixes").findOne({"server.serverID":interaction.guild.id}).then(guild => guild);
|
||||
if (guild.server.hasCustomRoles==false) {
|
||||
if (!client.exists(guild.server.hasCustomRoles) || !guild.server.hasCustomRoles) {
|
||||
return interaction.send({ content: 'There are no roles set for the bot.' });
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user