diff options
-rw-r--r-- | commands/util/defaults/emote.js.json | 4 | ||||
-rw-r--r-- | events/interaction.js | 4 | ||||
-rw-r--r-- | events/message.js | 4 | ||||
-rw-r--r-- | index.js | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/commands/util/defaults/emote.js.json b/commands/util/defaults/emote.js.json index 9dd461b..0f29377 100644 --- a/commands/util/defaults/emote.js.json +++ b/commands/util/defaults/emote.js.json @@ -41,5 +41,5 @@ "triggered":"triggered", "wag":"wagged", "wink":"winked" -}},"cooldown":3600,"desc":"Sends a gif","restrict":[],"restricted":[], -"usage":"{command} [user]"}
\ No newline at end of file +}},"cooldown":3600,"desc":"Sends a gif","restrict":["825023574221783102","1058360872587767819"],"restricted":[], +"usage":"{command} [user]"} 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() @@ -7,7 +7,7 @@ process.stdout.write = process.stderr.write = (function(write) { access.write(string) } })(process.stdout.write) -process.title = "sns-chan" +process.title = "sns\-chan" /** * Module Imports */ |