From 2ff8b5a0e185cb56ab1702ecf9cc540e35484d96 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@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); ({