From eb2276987cc368402dfec4c83d7605ddee0c31f8 Mon Sep 17 00:00:00 2001 From: tippfehlr Date: Fri, 30 Aug 2024 20:14:24 +0200 Subject: [PATCH] fix: correct command permissions --- src/modules/commands/addActivityRole.ts | 1 - src/modules/commands/reset.ts | 2 +- src/modules/commands/setStatusRole.ts | 11 ++++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/modules/commands/addActivityRole.ts b/src/modules/commands/addActivityRole.ts index 74eef86..c723600 100644 --- a/src/modules/commands/addActivityRole.ts +++ b/src/modules/commands/addActivityRole.ts @@ -13,7 +13,6 @@ import { APIRole, SlashCommandBuilder, ComponentType, - Colors, } from 'discord.js'; import { Command } from '../commandHandler'; diff --git a/src/modules/commands/reset.ts b/src/modules/commands/reset.ts index aa711f1..fe8b4ac 100644 --- a/src/modules/commands/reset.ts +++ b/src/modules/commands/reset.ts @@ -11,7 +11,7 @@ import { } from 'discord.js'; import { Command } from '../commandHandler'; -import { __, discordTranslations, log } from '../messages'; +import { __, discordTranslations } from '../messages'; import { db, getLang } from '../db'; export default { diff --git a/src/modules/commands/setStatusRole.ts b/src/modules/commands/setStatusRole.ts index ecf4caf..c42f015 100644 --- a/src/modules/commands/setStatusRole.ts +++ b/src/modules/commands/setStatusRole.ts @@ -4,13 +4,22 @@ import { db, getLang } from './../db'; import { Command } from '../commandHandler'; import { __, discordTranslations, getEnumKey } from '../messages'; -import { ActivityType, APIRole, Colors, EmbedBuilder, Role, SlashCommandBuilder } from 'discord.js'; +import { + ActivityType, + APIRole, + Colors, + EmbedBuilder, + PermissionsBitField, + Role, + SlashCommandBuilder, +} from 'discord.js'; export default { data: new SlashCommandBuilder() .setName('setstatusrole') .setDescription('role to assign on LISTENING/WATCHING/etc.') .setDescriptionLocalizations(discordTranslations('role to assign on LISTENING/WATCHING/etc.')) .setDMPermission(false) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageRoles) .addStringOption(option => option .setName('event')