fix error in tictactoe

This commit is contained in:
Jonny_Bro (Nikita) 2024-11-18 19:31:24 +05:00
parent 4aa0cfe9fa
commit 19ed241e76
Signed by: jonny_bro
GPG key ID: 3F1ECC04147E9BD8

View file

@ -81,23 +81,14 @@ async function tictactoe(interaction, options = {}) {
const decline = new ButtonBuilder().setLabel(interaction.translate("common:DECLINE")).setStyle(ButtonStyle.Danger).setCustomId("declinettt");
const accep = new ActionRowBuilder().addComponents([accept, decline]);
let m;
if (interaction.commandId)
m = interaction.reply({
const m = interaction.reply({
content: interaction.translate("fun/tictactoe:INVITE_USER", {
opponent: opponent.id,
}),
embeds: [acceptEmbed],
components: [accep],
});
else if (!interaction.commandId)
m = interaction.reply({
content: interaction.translate("fun/tictactoe:INVITE_USER", {
opponent: opponent.id,
}),
embeds: [acceptEmbed],
components: [accep],
});
fetchReply: true,
}).then(m => m);
const collector = m.createMessageComponentCollector({
componentType: ComponentType.Button,