1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 16:30:58 -05:00

Fix not being able to use /pw outside of main guild

This commit is contained in:
AnxietyisReal 2024-01-04 11:46:19 +11:00
parent be14114f8e
commit 2ff8b5a0e1

View File

@ -3,7 +3,7 @@ import TClient from '../client.js';
import MessageTool from '../helpers/MessageTool.js'; import MessageTool from '../helpers/MessageTool.js';
export default class ProhibitedWords { export default class ProhibitedWords {
static async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){ 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 word = interaction.options.getString('word');
const wordExists = await client.prohibitedWords.findWord(word); const wordExists = await client.prohibitedWords.findWord(word);
({ ({