diff options
-rw-r--r-- | commands/add.js | 10 | ||||
-rw-r--r-- | commands/preview.js | 2 | ||||
-rw-r--r-- | commands/send.js (renamed from commands/use.js) | 6 | ||||
-rw-r--r-- | help.md | 2 | ||||
-rw-r--r-- | resetcmd.js | 10 |
5 files changed, 20 insertions, 10 deletions
diff --git a/commands/add.js b/commands/add.js index 5d74b6a..0fbdb56 100644 --- a/commands/add.js +++ b/commands/add.js @@ -3,10 +3,10 @@ const { SlashCommandBuilder } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('add') - .setDescription('Add a Command') + .setDescription('Add a command') .addStringOption(option => - option.setName('command') - .setDescription('The name of the command `/use THIS`') + option.setName('name') + .setDescription('The name of the command `/send THIS`') .setRequired(true)) .addStringOption(option => option.setName('content') @@ -15,8 +15,8 @@ module.exports = { async execute(interaction) { if (global.data.getList().length <= 25) { - global.data.add(interaction.options.getString('command'),interaction.options.getString('content')); - await interaction.reply('Added `'+interaction.options.getString('command')+'`.'); + global.data.add(interaction.options.getString('name'),interaction.options.getString('content')); + await interaction.reply('Added `'+interaction.options.getString('name')+'`.'); } else { diff --git a/commands/preview.js b/commands/preview.js index 013f650..3ca6780 100644 --- a/commands/preview.js +++ b/commands/preview.js @@ -6,7 +6,7 @@ module.exports = { .setDescription('Only you can see this!') .addStringOption(option => option.setName('command') - .setDescription('Name of the command to display') + .setDescription('Name of the command to preview') .setRequired(true) .addChoices(...global.data.getList()) ), diff --git a/commands/use.js b/commands/send.js index dc9897b..a339784 100644 --- a/commands/use.js +++ b/commands/send.js @@ -2,11 +2,11 @@ const { SlashCommandBuilder } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() - .setName('use') - .setDescription('Use a Command') + .setName('send') + .setDescription('Send a command') .addStringOption(option => option.setName('command') - .setDescription('What the bot will send') + .setDescription('Name of the command to send') .setRequired(true) .addChoices(...global.data.getList()) ), @@ -1,5 +1,5 @@ # welcome to sowbot 3! -- To use a command, type `/use` then the name of the command. A list of available commands should appear. +- To use a command, type `/send` then the name of the command. A list of available commands should appear. - To preview a command (only you see it) run `/preview` then the name of the command. A list of available commands should appear. - To add a command type `/add`. In the name field, put the name of the command. In the content field put the image link or whatever else you want the bot to send. - To remove a command type `/remove` then the name of the command. A list of available commands should appear. diff --git a/resetcmd.js b/resetcmd.js new file mode 100644 index 0000000..e11e54a --- /dev/null +++ b/resetcmd.js @@ -0,0 +1,10 @@ +const { REST, Routes } = require('discord.js'); +const { clientId, token } = require('./config.json'); + +// Construct and prepare an instance of the REST module +const rest = new REST().setToken(token); + +// and deploy your commands! +rest.put(Routes.applicationCommands(clientId), { body: [] }) + .then(() => console.log('Successfully deleted all application commands.')) + .catch(console.error);
\ No newline at end of file |