From 4ee60e9c3e0a6135f44337c6364fae2d6cbfd4bf Mon Sep 17 00:00:00 2001 From: Eric Yang <64386991+xlq902@users.noreply.github.com> Date: Thu, 7 Apr 2022 23:41:06 -0400 Subject: [PATCH] Create settings.ts --- src/commands/settings.ts | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/commands/settings.ts diff --git a/src/commands/settings.ts b/src/commands/settings.ts new file mode 100644 index 0000000..8166415 --- /dev/null +++ b/src/commands/settings.ts @@ -0,0 +1,42 @@ +import { SlashCommandBuilder } from '@discordjs/builders'; +const { MessageActionRow, MessageSelectMenu } = require('discord.js'); +import { CommandInteraction, MessageEmbed } from 'discord.js'; + +import log from '../helpers/log'; + +export const data = new SlashCommandBuilder() + .setName('settings') + .setDescription('BETA - settings configuration'); + + +export async function execute(interaction : CommandInteraction) { + await interaction.deferReply(); + const settingsEmbed = new MessageEmbed() + .setColor('#ffffff'); + + const user = interaction.options.getUser('user') || interaction.user; + + settingsEmbed + .setAuthor({ name: user.tag, iconURL: user.displayAvatarURL() }) + .setDescription(`a`); + const menu = new MessageActionRow() + .addComponents( + new MessageSelectMenu() + .setCustomId('select') + .setPlaceholder('Nothing selected') + .addOptions([ + { + label: 'Select me', + description: 'This is a description', + value: 'first_option', + }, + { + label: 'You can select me too', + description: 'This is also a description', + value: 'second_option', + }, + ]), + ); + await interaction.followUp({ embeds: [settingsEmbed] }); + +} \ No newline at end of file