From 1b849e26e62a0b450d21c160eebc315c42864023 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Thu, 4 Jan 2024 11:46:19 +1100 Subject: [PATCH] Fix not being able to use /pw outside of main guild --- src/commands/prohibitedWords.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/prohibitedWords.ts b/src/commands/prohibitedWords.ts index 729f761..eb4ecd1 100644 --- a/src/commands/prohibitedWords.ts +++ b/src/commands/prohibitedWords.ts @@ -3,7 +3,7 @@ import TClient from '../client.js'; import MessageTool from '../helpers/MessageTool.js'; export default class ProhibitedWords { static async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){ - if (!MessageTool.isStaff(interaction.member)) return MessageTool.youNeedRole(interaction, 'admin'); + if (!MessageTool.isStaff(interaction.member) && !client.config.whitelist.includes(interaction.member.id)) return MessageTool.youNeedRole(interaction, 'admin'); const word = interaction.options.getString('word'); const wordExists = await client.prohibitedWords.findWord(word); ({