1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-12-27 00:05:39 -05:00

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

This commit is contained in:
toast-ts 2024-01-04 11:46:19 +11:00
parent eef4a72315
commit 1b849e26e6

View File

@ -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);
({