Skip to content

Commit 143bc02

Browse files
authored
fix(commands): add permissions for all slashcommands (#110)
1 parent e2ad150 commit 143bc02

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/modules/quoiFeur/quoiFeur.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SlashCommandBuilder } from 'discord.js';
1+
import { PermissionFlagsBits, SlashCommandBuilder } from 'discord.js';
22

33
import { createModule } from '../../core/createModule';
44
import {
@@ -20,6 +20,7 @@ export const quoiFeur = createModule({
2020
.addSubcommand((subcommand) =>
2121
subcommand.setName('disable').setDescription('Disable the quoi-feur game in the channel'),
2222
)
23+
.setDefaultMemberPermissions(PermissionFlagsBits.ManageChannels)
2324
.toJSON(),
2425
handler: {
2526
enable: addQuoiFeurToChannel,

src/modules/recurringMessage/recurringMessage.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SlashCommandBuilder } from 'discord.js';
1+
import { PermissionFlagsBits, SlashCommandBuilder } from 'discord.js';
22

33
import { createModule } from '../../core/createModule';
44
import {
@@ -49,6 +49,7 @@ export const recurringMessage = createModule({
4949
.addSubcommand((subcommand) =>
5050
subcommand.setName('list').setDescription('List recurring messages'),
5151
)
52+
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages)
5253
.toJSON(),
5354
handler: {
5455
add: async (interaction) => {

src/modules/voiceOnDemand/voiceOnDemand.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ChannelType, Guild, SlashCommandBuilder } from 'discord.js';
1+
import { ChannelType, Guild, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js';
22

33
import { cache } from '../../core/cache';
44
import { createModule } from '../../core/createModule';
@@ -18,6 +18,7 @@ export const voiceOnDemand = createModule({
1818
.addSubcommand((subcommand) =>
1919
subcommand.setName('create').setDescription('Creates the voice lobby'),
2020
)
21+
.setDefaultMemberPermissions(PermissionFlagsBits.ManageChannels)
2122
.toJSON(),
2223
handler: {
2324
create: async (interaction): Promise<void> => {

0 commit comments

Comments
 (0)