aboutsummaryrefslogtreecommitdiff
path: root/events/interaction.js
diff options
context:
space:
mode:
Diffstat (limited to 'events/interaction.js')
-rw-r--r--events/interaction.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/events/interaction.js b/events/interaction.js
index 3a3b32a..c65ecb7 100644
--- a/events/interaction.js
+++ b/events/interaction.js
@@ -22,8 +22,8 @@ module.exports = {
interaction.user = interaction.guild.members.cache.get(interaction.user.id)
let mod = interaction.user.permissions!=null&&interaction.user.permissions?.has(PermissionsBitField.Flags.KickMembers)
let command = global.s_commands.find(o => o.name === interaction.commandName)
- if(!((!command.command.config.restrict||command.command.config.restrict.includes(interaction.channel.id))&&
- (!command.command.config.restricted||!command.command.config.restricted.includes(interaction.channel.id)))&&!mod)
+ if(!((!command.command.config.restrict||command.command.config.restrict.length==0||command.command.config.restrict.includes(interaction.channel.id))&&
+ (!command.command.config.restricted||command.command.config.restricted.length==0||!command.command.config.restricted.includes(interaction.channel.id)))&&!mod)
return interaction.reply({content:"you cannot send this here! try `sns help` for more info",ephemeral:true})
if(command==null)
return;