mirror of
https://github.com/JonnyBro/JaBa.git
synced 2025-01-01 16:23:02 +05:00
move channel archivation
This commit is contained in:
parent
dbfc178bac
commit
5872c6f2bd
1 changed files with 5 additions and 4 deletions
|
@ -109,8 +109,6 @@ class Number extends BaseCommand {
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
channel.setArchived(true);
|
|
||||||
|
|
||||||
const deleteYes = new ButtonBuilder()
|
const deleteYes = new ButtonBuilder()
|
||||||
.setCustomId("number_delete_yes")
|
.setCustomId("number_delete_yes")
|
||||||
.setLabel(interaction.translate("common:YES"))
|
.setLabel(interaction.translate("common:YES"))
|
||||||
|
@ -141,6 +139,7 @@ class Number extends BaseCommand {
|
||||||
|
|
||||||
collector.on("end", (_, reason) => {
|
collector.on("end", (_, reason) => {
|
||||||
delete currentGames[interaction.guildId];
|
delete currentGames[interaction.guildId];
|
||||||
|
|
||||||
if (reason === "time") return interaction.editReply({ content: interaction.translate("fun/number:DEFEAT", { number }) });
|
if (reason === "time") return interaction.editReply({ content: interaction.translate("fun/number:DEFEAT", { number }) });
|
||||||
else if (reason === "force") return interaction.editReply({ content: interaction.translate("misc:FORCE_STOP", { user: interaction.member.toString(), number }) });
|
else if (reason === "force") return interaction.editReply({ content: interaction.translate("misc:FORCE_STOP", { user: interaction.member.toString(), number }) });
|
||||||
});
|
});
|
||||||
|
@ -158,8 +157,10 @@ class Number extends BaseCommand {
|
||||||
|
|
||||||
if (interaction.customId === "number_delete_yes")
|
if (interaction.customId === "number_delete_yes")
|
||||||
interaction.channel.delete();
|
interaction.channel.delete();
|
||||||
else if (interaction.customId === "number_delete_no")
|
else if (interaction.customId === "number_delete_no") {
|
||||||
interaction.message.delete();
|
await interaction.message.delete();
|
||||||
|
interaction.channel.setArchived(true);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue