fix: ignore message if there's no content

This commit is contained in:
GramingFoxTeam
2022-11-16 16:44:49 +03:00
parent d98902a285
commit 3cbebc2842
2 changed files with 3 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ export default {
name: Events.MessageCreate,
once: false,
execute(msg) {
msg.client.helper.scanText(msg.content, `${msg.channelId}/${msg.id}`);
if (!msg.content) return;
msg.client.helper.scanText(msg.content.toLowerCase(), `${msg.channelId}/${msg.id}`);
}
};

View File

@@ -2,6 +2,7 @@ export default {
name: 'message',
once: false,
async execute(msg) {
if (!msg.text) return;
global.helper.scanText(msg.text.toLowerCase(), `${msg.chat.id}/${msg.message_thread_id}/${msg.message_id}`);
}
}