Fix bot crashing when being timed out

This commit is contained in:
pixtaded 2024-08-31 16:50:19 +03:00
parent 29b80ff98b
commit fbbc821d74

View File

@ -72,8 +72,7 @@ async function processGuildTextMessage(message) {
|| (message.reference && message.channel.messages.cache.get(message.reference.messageId).author.id == client.user.id)))
sendToAI(message);
else if (message.guild.id == shapeGuild && message.author.bot && savedMessage) {
savedMessage.channel.sendTyping();
savedMessage.channel.send("<@" + savedMessage.author.id + "> " + message.content);
Promise.all([savedMessage.channel.sendTyping(), savedMessage.channel.send("<@" + savedMessage.author.id + "> " + message.content)]).catch(error => {});
}
if (!isAllowedUser(message.author.id)) count++;
}