Add user permission

This commit is contained in:
Supositware 2022-08-29 21:06:18 +02:00
parent c24520dd24
commit 0f64fd79f2

View file

@ -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'; import db from '../../models/index.js';
export default { export default {
@ -6,6 +6,7 @@ export default {
.setName('autoresponse') .setName('autoresponse')
.setDescription('Enable or disable autoresponse'), .setDescription('Enable or disable autoresponse'),
category: 'utility', category: 'utility',
userPermissions: [PermissionFlagsBits.ManageMessages],
async execute(interaction, args, client) { async execute(interaction, args, client) {
const autoresponseStat = await db.autoresponseStat.findOne({ where: { serverID: interaction.guild.id } }); const autoresponseStat = await db.autoresponseStat.findOne({ where: { serverID: interaction.guild.id } });