Files
bot_Tamiseur/src/buttons/player/disco_channel.ts
Zachary Guénot ddd617317c
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6m16s
Réécriture complète 4.0
2025-06-09 16:29:12 +02:00

16 lines
784 B
TypeScript

import { MessageFlags, ChannelType, ActionRowBuilder, ChannelSelectMenuBuilder } from "discord.js"
import type { ButtonInteraction } from "discord.js"
import { t } from "@/utils/i18n"
export const id = "player_disco_channel"
export async function execute(interaction: ButtonInteraction) {
const channelSelect = new ChannelSelectMenuBuilder()
.setCustomId("player_disco_channel")
.setPlaceholder(t(interaction.locale, "selectmenus.placeholders.select_channel_disco"))
.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
const row = new ActionRowBuilder<ChannelSelectMenuBuilder>().addComponents(channelSelect)
return interaction.reply({ content: t(interaction.locale, "player.disco.select_channel"), components: [row], flags: MessageFlags.Ephemeral })
}