forked from Supositware/Haha-Yes
trigger cleanUp() only if it was from a message
This commit is contained in:
parent
d4a56009fd
commit
c4574e47f6
1 changed files with 2 additions and 2 deletions
|
@ -161,7 +161,7 @@ async function download(url, interaction, originalInteraction) {
|
|||
if (interactionMenu.customId === 'preset') {
|
||||
await interactionMenu.deferReply({ ephemeral: false });
|
||||
compress(file, interactionMenu, Embed);
|
||||
cleanUp();
|
||||
if (interaction.isMessage) cleanUp();
|
||||
}
|
||||
});
|
||||
return;
|
||||
|
@ -182,7 +182,7 @@ async function download(url, interaction, originalInteraction) {
|
|||
else {
|
||||
await interaction.editReply({ embeds: [Embed], files: [output], ephemeral: false });
|
||||
}
|
||||
cleanUp();
|
||||
if (interaction.isMessage) cleanUp();
|
||||
})
|
||||
.catch(async err => {
|
||||
console.error(err);
|
||||
|
|
Loading…
Reference in a new issue