Changing commands to dynamic handling rather than if/else.

This commit is contained in:
alwayscompiling
2022-06-20 22:47:56 -04:00
parent be8790e5b1
commit 59d9115eb5
5 changed files with 73 additions and 8 deletions
+10
View File
@@ -0,0 +1,10 @@
const { SlashCommandBuilder } = require('@discordjs/builders');
module.exports = {
data: new SlashCommandBuilder()
.setName('server')
.setDescription('Provides server information.'),
async execute(interaction) {
await interaction.reply(`Server name: ${interaction.guild.name}\nTotal members: ${interaction.guild.memberCount}`);
},
};