From 87fa9e762d94385998a49bab83621efc27df2136 Mon Sep 17 00:00:00 2001 From: baz Date: Sat, 30 Dec 2023 00:49:50 +0000 Subject: [PATCH] Delete redundant commands --- commands/testing/avatar.js | 14 -------------- commands/testing/ping.js | 11 ----------- commands/testing/reload.js | 32 -------------------------------- commands/testing/server.js | 10 ---------- commands/testing/user.js | 14 -------------- 5 files changed, 81 deletions(-) delete mode 100644 commands/testing/avatar.js delete mode 100644 commands/testing/ping.js delete mode 100644 commands/testing/reload.js delete mode 100644 commands/testing/server.js delete mode 100644 commands/testing/user.js diff --git a/commands/testing/avatar.js b/commands/testing/avatar.js deleted file mode 100644 index 44a7378..0000000 --- a/commands/testing/avatar.js +++ /dev/null @@ -1,14 +0,0 @@ -const { SlashCommandBuilder } = require('discord.js'); - -module.exports = { - data: new SlashCommandBuilder() - .setName('avatar') - .setDescription('Get the avatar URL of the selected user, or your own avatar.') - .addUserOption(option => option.setName('user').setDescription('The user\'s avatar to show')), - - async execute(interaction) { - const user = interaction.options.getUser('user'); - if (user) return interaction.reply(`${user.username}'s avatar: ${user.displayAvatarURL()}`); - return interaction.reply(`Your avatar: ${interaction.user.displayAvatarURL()}`); - }, -}; \ No newline at end of file diff --git a/commands/testing/ping.js b/commands/testing/ping.js deleted file mode 100644 index e94c060..0000000 --- a/commands/testing/ping.js +++ /dev/null @@ -1,11 +0,0 @@ -const { SlashCommandBuilder } = require('discord.js'); - -module.exports = { - data: new SlashCommandBuilder() - .setName('ping') - .setDescription('Replies with pong!'), - - async execute(interaction) { - await interaction.reply('Pong!'); - }, -}; \ No newline at end of file diff --git a/commands/testing/reload.js b/commands/testing/reload.js deleted file mode 100644 index ad7df33..0000000 --- a/commands/testing/reload.js +++ /dev/null @@ -1,32 +0,0 @@ -const { SlashCommandBuilder } = require('discord.js'); - -module.exports = { - data: new SlashCommandBuilder() - .setName('reload') - .setDescription('Reload a command.') - .addStringOption(option => - option.setName('command') - .setDescription('The command to reload.') - .setRequired(true)), - - async execute(interaction) { - const commandName = interaction.options.getString('command', true).toLowerCase(); - const command = interaction.client.commands.get(commandName); - - if (!command) { - return interaction.reply(`There is no command with name \`${commandName}\`!`); - } - - delete require.cache[require.resolve(`./${command.data.name}.js`)]; - - try { - interaction.client.commands.delete(command.data.name); - const newCommand = require(`./${command.data.name}.js`); - interaction.client.commands.set(newCommand.data.name, newCommand); - await interaction.reply(`Command \`${newCommand.data.name}\` was reloaded!`); - } catch (error) { - console.error(error); - await interaction.reply(`There was an error while reloading a command \`${command.data.name}\`:\n\`${error.message}\``); - } - }, -}; \ No newline at end of file diff --git a/commands/testing/server.js b/commands/testing/server.js deleted file mode 100644 index 2ee386a..0000000 --- a/commands/testing/server.js +++ /dev/null @@ -1,10 +0,0 @@ -const { SlashCommandBuilder } = require('discord.js'); - -module.exports = { - data: new SlashCommandBuilder() - .setName('server') - .setDescription('Provides information about the server.'), - async execute(interaction) { - await interaction.reply(`This server is ${interaction.guild.name} and has ${interaction.guild.memberCount} members.`); - }, -}; \ No newline at end of file diff --git a/commands/testing/user.js b/commands/testing/user.js deleted file mode 100644 index ff9fb58..0000000 --- a/commands/testing/user.js +++ /dev/null @@ -1,14 +0,0 @@ -const { SlashCommandBuilder } = require('discord.js'); - -module.exports = { - data: new SlashCommandBuilder() - .setName('user') - .setDescription('Provides information about the user.'), - - async execute(interaction) { - // interaction.user is the object representing the user who ran the command - // interaction.member is the GuildMember object, which represents the user in the specific guild - await interaction.reply(`This command was run by ${interaction.user.username}, who joined on ${interaction.member.joinedAt}.`); - - }, -}; \ No newline at end of file