Archived
interaction closing
This commit is contained in:
1 parent
6fd5e8b892
commit
62a4bc35c8
1 file changed
+16
@@ -131,6 +131,22 @@ export class Command {
|
||||
await interaction.reply(fnResult);
|
||||
} else if (fnResult instanceof MessageEmbed) {
|
||||
await interaction.reply({ embeds: [fnResult] });
|
||||
} else if (!interaction.replied) {
|
||||
try {
|
||||
await interaction.reply({
|
||||
embeds: [
|
||||
new MessageEmbed()
|
||||
.setColor("#00ff00")
|
||||
.setTitle(
|
||||
"✅ Task completed successfully"
|
||||
),
|
||||
],
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(
|
||||
"Cannot reply. The interaction has been closed"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user