mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-27 20:35:38 -05:00
on second thought, it should be admin only.
This commit is contained in:
parent
9f71f81edf
commit
48b57cba5f
@ -2,7 +2,7 @@ import Discord,{SlashCommandBuilder} from 'discord.js';
|
||||
import { TClient } from 'src/client';
|
||||
export default {
|
||||
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
||||
if (!client.isStaff(interaction.member) && !client.config.eval.whitelist.includes(interaction.member.id)) return client.youNeedRole(interaction, 'dcmod')
|
||||
if (!client.isStaff(interaction.member) && !client.config.eval.whitelist.includes(interaction.member.id)) return client.youNeedRole(interaction, 'admin')
|
||||
const word = interaction.options.getString('word');
|
||||
if (client.bannedWords._content.includes(word)) return interaction.reply({content: 'That word is already added to the list.', ephemeral: true});
|
||||
client.bannedWords.addData(word).forceSave();
|
||||
@ -16,4 +16,4 @@ export default {
|
||||
.setName('word')
|
||||
.setDescription('What word do you want automod to ban?')
|
||||
.setRequired(true))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user