Add auto-delete to busy message

This commit is contained in:
Christopher Cookman 2023-03-10 11:25:21 -07:00
parent d7664d4f8c
commit e1a114ca45
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -137,7 +137,11 @@ client.on('messageCreate', async (message) => {
// If the session is processing, don't do anything // If the session is processing, don't do anything
if (sessions[message.channelId].processing) { if (sessions[message.channelId].processing) {
message.delete(); message.delete();
return message.author.send(lang.busy); return message.author.send(lang.busy).then((msg) => {
setTimeout(() => {
msg.delete();
}, 10000);
});
} }
// Set the timer // Set the timer
message.channel.sendTyping(); message.channel.sendTyping();