aboutsummaryrefslogtreecommitdiff
path: root/events/interaction.js
diff options
context:
space:
mode:
authorame <[email protected]>2023-09-27 16:39:38 -0500
committerame <[email protected]>2023-09-27 16:39:38 -0500
commit8064e8a3175785425bbb6e5be40adb1000215b74 (patch)
tree66fa84c0e3f4ba183f5f665780ecda5b1c6d162a /events/interaction.js
parentb4d9e683a2d40f6d76629323d35523871d3337e5 (diff)
fix restrict(ed) channels
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;