Весь код:
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]
}
)
}
я лох(