add guides #14

Merged
kenobi merged 3 commits from buttons into master 2023-06-09 22:23:51 +02:00
Showing only changes of commit 24c120a890 - Show all commits

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]
//})
}
})