diff --git a/commands/Music/nowplaying.js b/commands/Music/nowplaying.js index a9c99647..aed15dfb 100644 --- a/commands/Music/nowplaying.js +++ b/commands/Music/nowplaying.js @@ -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); } } diff --git a/events/CommandHandler.js b/events/CommandHandler.js index 723538ac..fd7c69da 100644 --- a/events/CommandHandler.js +++ b/events/CommandHandler.js @@ -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;