From 2d181d2f5a58485de9c3fb728092e7776ca0defa Mon Sep 17 00:00:00 2001 From: baz Date: Fri, 17 Nov 2023 23:24:24 +0000 Subject: [PATCH] Add user slash command --- commands/testing/user.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 commands/testing/user.js diff --git a/commands/testing/user.js b/commands/testing/user.js new file mode 100644 index 0000000..7b1b0b7 --- /dev/null +++ b/commands/testing/user.js @@ -0,0 +1,12 @@ +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