From 4365bbe479f686c65bf840b8245559a82bd37447 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Tue, 4 Jan 2022 16:09:05 -0700 Subject: [PATCH] default prefix changes in dev mode --- events/messageCreate.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/events/messageCreate.js b/events/messageCreate.js index 957155e..414ad27 100644 --- a/events/messageCreate.js +++ b/events/messageCreate.js @@ -19,11 +19,10 @@ module.exports = async (client, message) => { if (!channelTypes.includes(message.channel.type)) {return undefined;} - //if (message.channel.type == "text") {if (settings[message.guild.id]) {prefix = settings[message.guild.id].prefix;};}; - if (message.guild && !message.member.permissions.has("SEND_MESSAGES")) {return undefined;} - let prefix = message.guild ? client.guildconfig.prefixes.has(message.guild.id) ? client.guildconfig.prefixes.get(message.guild.id) !== null ? client.guildconfig.prefixes.get(message.guild.id) : 'n?' : 'n?' : 'n?'; + let defaultPrefix = client.misc.config.dev ? 'n!' : 'n?'; + let prefix = message.guild ? client.guildconfig.prefixes.has(message.guild.id) ? client.guildconfig.prefixes.get(message.guild.id) !== null ? client.guildconfig.prefixes.get(message.guild.id) : defaultPrefix : defaultPrefix : defaultPrefix; let msg = message.content.toLowerCase().replace('\u200E', ''); let mention = message.mentions.users.first(); @@ -78,7 +77,7 @@ module.exports = async (client, message) => { } } - //if (message.guild && client.misc.cache.chests.includes(message.guild.id)) {require('../util/lxp/spawnchest')(client, message.member, message.channel, prefix);} + if (message.guild && client.misc.cache.chests.enabled.includes(message.guild.id)) {require('../util/lxp/spawnchest')(client, message.member, message.channel, prefix);} if (!client.misc.cache.monners[message.author.id]) { let tmonners = await Monners.findOne({uid: message.author.id}) || new Monners({uid: message.author.id});