Réécriture complète 4.0
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6m16s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6m16s
This commit is contained in:
19
src/buttons/twitch/channel.ts
Normal file
19
src/buttons/twitch/channel.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { MessageFlags, ChannelType, ActionRowBuilder, ChannelSelectMenuBuilder } from "discord.js"
|
||||
import type { ButtonInteraction } from "discord.js"
|
||||
import { t } from "@/utils/i18n"
|
||||
|
||||
export const id = "twitch_channel"
|
||||
export async function execute(interaction: ButtonInteraction) {
|
||||
const channelSelect = new ChannelSelectMenuBuilder()
|
||||
.setCustomId("twitch_channel")
|
||||
.setPlaceholder(t(interaction.locale, "twitch.select_notification_channel_placeholder"))
|
||||
.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
|
||||
|
||||
const row = new ActionRowBuilder<ChannelSelectMenuBuilder>().addComponents(channelSelect)
|
||||
|
||||
return interaction.reply({
|
||||
content: t(interaction.locale, "twitch.select_notification_channel"),
|
||||
components: [row],
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user