aboutsummaryrefslogtreecommitdiff
path: root/events
diff options
context:
space:
mode:
Diffstat (limited to 'events')
-rw-r--r--events/interaction.js4
-rw-r--r--events/message.js4
2 files changed, 4 insertions, 4 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;
diff --git a/events/message.js b/events/message.js
index 817a592..59e79ef 100644
--- a/events/message.js
+++ b/events/message.js
@@ -76,8 +76,8 @@ module.exports = {
com_string.shift()
com_string = parse_inp(com_string.join(" "))
try{
- if(((!com.config.restrict||com.config.restrict.includes(message.channel))&&
- (!com.config.restricted||!com.config.restricted.includes(message.channel)))||mod)
+ if(((!com.config.restrict||com.config.restrict.length==0||com.config.restrict.includes(message.channel))&&
+ (!com.config.restricted||com.config.restricted.length==0||!com.config.restricted.includes(message.channel)))||mod)
if(mod||com.config.cooldown==null||com.last_command[uid]==null||(date.getTime()-com.last_command[uid].getTime())/1000>com.config.cooldown){
await com.main(client,Discord,message,com_string,com_call)
com.last_command[uid] = new Date()