LIREN
@LIREN
Пунктумофоб

Как отправить embed с button?

Весь код:

export default {
    category: "Play",
    description: "Игра орёл и решка",

    slash: true,
    testOnly: true,

    callback: async ({ interaction: msgInt, channel }) => {
        await msgInt.reply({
            content: "Ты точно хочешь играть в игру - Орёл и решка?",
            components: [row]
        })

        const filter = (BigInt: Interaction) => {
            return msgInt.user.id === BigInt.user.id
        }

        const collector = channel.createMessageComponentCollector({
            filter, 
            max:1, 
            time: 15000
        })

        collector.on("collect", async i => {
            if (i.customId === "button_yes") {
                await i.reply(
                    {
                        message: [embed1],
                        components: [row_1]
                    }
                )
            }

            if (i.customId === "button_no") {
                await i.reply(
                    {
                        content: "Игра была отменена.", 
                        components: []
                    }
                )
            }
        })
    },
} as ICommand


Это отрывок, где я хочу сделать embed соединённый с кнопками:

collector.on("collect", async i => {
    if (i.customId === "button_yes") {
        await i.reply(
            {
                message: [embed1],
                components: [row_1]
            }
        )
    }

я лох(
  • Вопрос задан
  • 71 просмотр
Решения вопроса 1
LIREN
@LIREN Автор вопроса
Пунктумофоб
Блин... Ребят ссори, я уже сам решил, оказывается надо так:
if (i.customId === "button_yes") {
                await i.reply(
                    {
                        embeds: [embed1],
                        components: [row_1]
                    }
                )
            }
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы