13.1.5 debug /search command and /config only_officers_search configuration

This commit is contained in:
SowinskiBraeden committed 2022-10-25 12:21:31 -07:00
1 parent 206972b487
commit 5317e96a48
3 files changed
+10 -7

No files matched your search

+6 -2
View File
@@ -39,8 +39,12 @@ 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.` });
}
if (GuildDB.onlyOfficersSearch && client.exists(GuildDB.officerRole) && !interaction.member.roles.includes(GuildDB.officerRole)) {
if (GuildDB.onlyOfficersSearch && !client.exists(GuildDB.officerRole)) {
return interaction.send({ content: 'The officer role is required to use this command but has not been configured for this server.' });
}
if (GuildDB.onlyOfficersSearch && !interaction.member.roles.includes(GuildDB.officerRole)) {
return interaction.send({ content: 'You don\'t have the permissions to use this command.' });
}