From 048f99752550c6e03d1990a03cad78f3ac7d73aa Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 5 Sep 2022 17:36:42 -0400 Subject: revamp command permissions, fix permission exploit for some command when used in forum channels, use enums more --- src/commands/moulberry-bush/neuRepo.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/commands/moulberry-bush/neuRepo.ts') diff --git a/src/commands/moulberry-bush/neuRepo.ts b/src/commands/moulberry-bush/neuRepo.ts index d8eb7ed..9ff2903 100644 --- a/src/commands/moulberry-bush/neuRepo.ts +++ b/src/commands/moulberry-bush/neuRepo.ts @@ -1,12 +1,6 @@ -import { BotCommand, clientSendAndPermCheck, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import canvas from '@napi-rs/canvas'; -import { - ApplicationCommandOptionType, - AttachmentBuilder, - AutocompleteInteraction, - CacheType, - PermissionFlagsBits -} from 'discord.js'; +import { ApplicationCommandOptionType, AttachmentBuilder, AutocompleteInteraction, CacheType } from 'discord.js'; import { join } from 'path'; import tinycolor from 'tinycolor2'; import { formattingInfo, RawNeuItem } from '../../../lib/utils/Minecraft.js'; @@ -43,7 +37,8 @@ export default class NeuRepoCommand extends BotCommand { } */ ], slash: false, - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true), + clientPermissions: ['EmbedLinks'], + clientCheckChannel: true, userPermissions: [], ownerOnly: true, hidden: true -- cgit