mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 20:30:58 -05:00
Fix not being able to use /pw outside of main guild
This commit is contained in:
parent
be14114f8e
commit
2ff8b5a0e1
@ -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