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

on second thought, it should be admin only.

This commit is contained in:
Toast 2022-12-03 01:52:26 +11:00 committed by GitHub
parent 3cf8a79d2f
commit 025e1ef222

View File

@ -2,7 +2,7 @@ import Discord,{SlashCommandBuilder} from 'discord.js';
import { TClient } from 'src/client'; import { TClient } from 'src/client';
export default { export default {
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){ 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'); 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}); 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(); client.bannedWords.addData(word).forceSave();