From 0f64fd79f23c167245b3665cbb58d746143047a9 Mon Sep 17 00:00:00 2001 From: Supositware Date: Mon, 29 Aug 2022 21:06:18 +0200 Subject: [PATCH] Add user permission --- commands/admin/autoresponse.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/admin/autoresponse.js b/commands/admin/autoresponse.js index 172657b5..942c2e29 100644 --- a/commands/admin/autoresponse.js +++ b/commands/admin/autoresponse.js @@ -1,4 +1,4 @@ -import { SlashCommandBuilder, ButtonBuilder, ButtonStyle, ActionRowBuilder } from 'discord.js'; +import { SlashCommandBuilder, ButtonBuilder, ButtonStyle, ActionRowBuilder, PermissionFlagsBits } from 'discord.js'; import db from '../../models/index.js'; export default { @@ -6,6 +6,7 @@ export default { .setName('autoresponse') .setDescription('Enable or disable autoresponse'), category: 'utility', + userPermissions: [PermissionFlagsBits.ManageMessages], async execute(interaction, args, client) { const autoresponseStat = await db.autoresponseStat.findOne({ where: { serverID: interaction.guild.id } });