diff --git a/config.json.default b/config.json.default index 761a7d2..137fbee 100644 --- a/config.json.default +++ b/config.json.default @@ -3,9 +3,10 @@ "token": "", "errorChannel": "", "levels": { - "lvlUpEquation": "30", + "lvlUpEquation": "5 * (lvl ^ 2) + (50 * lvl) + 100", "lvlUpMessage": "{user}, you have leveled up to level {lvl}!", - "cooldownMinutes": 1 + "cooldownMinutes": 1, + "blacklist": [] } } -} \ No newline at end of file +} diff --git a/index.js b/index.js index c37235d..8a254c4 100644 --- a/index.js +++ b/index.js @@ -56,7 +56,9 @@ client.on("ready", async () => { client.on("messageCreate", async message => { if (message.author.bot) return; if (message.channel.type === "DM") return; - + if (config.discord.levels.blacklist.includes(message.channel.id)) return; + if (config.discord.levels.blacklist.includes(message.channel.parentId)) return; + // Calculate random xp let xp = Math.floor(Math.random() * 10) + 15; // If user is not in database, add them, {user: {xp = xp, lvl = 1, totalXp: xp, msgCount = 1}}