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