Update commands to slash commands

This commit is contained in:
Logan Cusano
2023-02-25 03:25:07 -05:00
parent 49c80b7f5e
commit 02bf0ebda2
16 changed files with 370 additions and 223 deletions

View File

@@ -1,6 +1,7 @@
const { SlashCommandBuilder } = require('discord.js');
const { DebugBuilder } = require("../utilities/debugBuilder");
const log = new DebugBuilder("server", "ping");
// TODO - Add insults as the response to this command
module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
@@ -8,11 +9,19 @@ module.exports = {
/*
.addStringOption(option =>
option.setName('input')
.setDescription('The input to echo back')),
.setDescription('The input to echo back')
.setRequired(false)
.addChoices()),
*/
example: "ping",
isPrivileged: false,
async execute(message) {
await message.channel.send('**Pong.**');
isPrivileged: false,
requiresTokens: false,
async execute(interaction) {
try{
await interaction.channel.send('**Pong.**'); // TODO - Add insults as the response to this command
}catch(err){
log.ERROR(err)
//await interaction.reply(err.toString());
}
}
};