mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 14:14:59 +05:00
autoupdate nowplaying every 2 minutes
This commit is contained in:
parent
87360465d1
commit
a945f42802
2 changed files with 13 additions and 2 deletions
|
@ -205,10 +205,21 @@ class Nowplaying extends BaseCommand {
|
|||
|
||||
const embed = await updateEmbed(interaction, queue);
|
||||
|
||||
interaction.editReply({
|
||||
const message = await interaction.editReply({
|
||||
embeds: [embed],
|
||||
components: [row1, row2],
|
||||
});
|
||||
|
||||
const i = setInterval(async function () {
|
||||
if (message && message.editable && queue.isPlaying()) {
|
||||
const e = await updateEmbed(interaction, queue);
|
||||
|
||||
message.edit({
|
||||
embeds: [e],
|
||||
components: [row1, row2],
|
||||
});
|
||||
} else clearInterval(i);
|
||||
}, 2 * 60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class CommandHandler extends BaseEvent {
|
|||
data.memberData = memberData;
|
||||
}
|
||||
|
||||
if (command.dirname.includes("IAT") && interaction.guildId !== "1039187019957555252") return interaction.reply({ content: "IAT Only", ephemeral: true });
|
||||
if (command?.dirname.includes("IAT") && interaction.guildId !== "1039187019957555252") return interaction.reply({ content: "IAT Only", ephemeral: true });
|
||||
if (interaction.isAutocomplete()) return await command.autocompleteRun(client, interaction);
|
||||
if (interaction.isButton() && interaction.customId === "quote_delete" && interaction.message.deletable) return interaction.message.delete();
|
||||
if (interaction.type !== InteractionType.ApplicationCommand && !interaction.isCommand()) return;
|
||||
|
|
Loading…
Reference in a new issue