mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-28 08:55:38 -05:00
Fix not being able to use /pw outside of main guild
This commit is contained in:
parent
eef4a72315
commit
1b849e26e6
@ -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);
|
||||||
({
|
({
|
||||||
|
Loading…
Reference in New Issue
Block a user