Make whitelist work with categories

This commit is contained in:
Christopher Cookman 2023-09-28 10:22:51 -06:00
parent 770edd83f1
commit 4e91ba17f8
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -836,7 +836,7 @@ client.on('messageCreate', async message => {
if (message.author.bot) return;
if (!message.guild) return;
if (message.channel.type == "dm") return;
if (!config.games.wordscramble.whitelist.includes(message.channel.id)) return;
if (!config.games.wordscramble.whitelist.includes(message.channel.id) && !config.games.wordscramble.whitelist.includes(message.channel.parentId)) return;
// Check if the channel already has a word scramble going
if (wordScrambles[message.channel.id]) {
if (wordScrambles[message.channel.id].badGuesses.includes(message.author.id)) return;