add /guides interaction with buttons

This commit is contained in:
mightypanders 2023-06-09 16:16:23 +02:00
parent 8ae5fd2c1b
commit 24c120a890
1 changed files with 41 additions and 0 deletions

41
server/commands/guides.ts Normal file
View File

@ -0,0 +1,41 @@
import { Command } from '../structures/command'
import { RunOptions } from '../types/commandTypes'
import { APIEmbed, ActionRowBuilder, ButtonBuilder, ButtonStyle } from 'discord.js'
import { v4 as uuid } from 'uuid'
import { logger } from '../logger'
export default new Command({
name: 'guides',
description: 'Bekomme eine Auswahl von Guides per DM',
options: [],
run: async (interaction: RunOptions) => {
const requestId = uuid()
const guildId = interaction.interaction.guild?.id
logger.info(`Starting guides interaction for user ${interaction.interaction.user.id}`, { requestId, guildId })
const mediaPlayerGuideButton = new ButtonBuilder()
.setCustomId('jfmpGuide')
.setLabel('Media Player Einrichtung')
.setStyle(ButtonStyle.Primary)
const accountSetup = new ButtonBuilder()
.setCustomId('accountGuid')
.setLabel('Account Anlage')
.setStyle(ButtonStyle.Primary)
const row = new ActionRowBuilder<ButtonBuilder>()
.addComponents(mediaPlayerGuideButton, accountSetup)
//const userDMchannel = await interaction.interaction.user.createDM()
interaction.interaction.followUp({
content: `Hier ist eine Auswahl von Guides.`,
components: [row]
})
//userDMchannel.send({
// content: `Hier ist eine Auswahl von Guides.`,
// components: [row]
//})
}
})