Channel/Category blacklist!

This commit is contained in:
Christopher Cookman 2023-04-22 12:56:46 -06:00
parent b085d65aa4
commit 53ff03c8d1
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42
2 changed files with 7 additions and 4 deletions

View file

@ -3,9 +3,10 @@
"token": "", "token": "",
"errorChannel": "", "errorChannel": "",
"levels": { "levels": {
"lvlUpEquation": "30", "lvlUpEquation": "5 * (lvl ^ 2) + (50 * lvl) + 100",
"lvlUpMessage": "{user}, you have leveled up to level {lvl}!", "lvlUpMessage": "{user}, you have leveled up to level {lvl}!",
"cooldownMinutes": 1 "cooldownMinutes": 1,
"blacklist": []
} }
} }
} }

View file

@ -56,6 +56,8 @@ client.on("ready", async () => {
client.on("messageCreate", async message => { client.on("messageCreate", async message => {
if (message.author.bot) return; if (message.author.bot) return;
if (message.channel.type === "DM") 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 // Calculate random xp
let xp = Math.floor(Math.random() * 10) + 15; let xp = Math.floor(Math.random() * 10) + 15;