From b0397fff7810ed5a4baa9a5d7bc228590f4add85 Mon Sep 17 00:00:00 2001 From: Supositware Date: Tue, 30 Aug 2022 23:33:10 +0200 Subject: [PATCH] Added the new commands --- scripts/deploy-commands.cjs | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/scripts/deploy-commands.cjs b/scripts/deploy-commands.cjs index fef25872..ad6f7c81 100644 --- a/scripts/deploy-commands.cjs +++ b/scripts/deploy-commands.cjs @@ -1,6 +1,7 @@ const { SlashCommandBuilder } = require('@discordjs/builders'); const { REST } = require('@discordjs/rest'); const { Routes } = require('discord-api-types/v9'); +const { PermissionFlagsBits } = require('discord.js'); require('dotenv').config(); const { clientId, guildId, token } = process.env; @@ -114,10 +115,6 @@ const commands = [ .setDescription('🤫') .setRequired(true)), - new SlashCommandBuilder() - .setName('autoresponse') - .setDescription('Enable or disable autoresponse'), - new SlashCommandBuilder() .setName('die') .setDescription('Kill the bot'), @@ -145,6 +142,30 @@ const commands = [ option.setName('tweetid') .setDescription('The id of the tweet you wish to delete.') .setRequired(true)), + + new SlashCommandBuilder() + .setName('autoresponse') + .setDescription('Enable or disable autoresponse') + .setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages), + + new SlashCommandBuilder() + .setName('bye') + .setDescription('Set a leave message') + .addStringOption(option => + option.setName('message') + .setDescription('The message you want the bot to say when someone leave in the current channel.')), + + new SlashCommandBuilder() + .setName('quotation') + .setDescription('Enable or disable quotations') + .setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages), + + new SlashCommandBuilder() + .setName('welcome') + .setDescription('Set a join message') + .addStringOption(option => + option.setName('message') + .setDescription('The message you want the bot to say when someone join in the current channel.')), ] .map(command => command.toJSON());