3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-07 19:17:19 +00:00

Add some safeguards against messages without an author

This commit is contained in:
Dragory 2018-08-02 02:28:52 +03:00
parent c4523ddc32
commit 27d525c155
2 changed files with 3 additions and 2 deletions

View file

@ -63,7 +63,7 @@ export class CensorPlugin extends Plugin {
}
async applyFiltersToMsg(msg: Message) {
if (msg.author.bot) return;
if (!msg.author || msg.author.bot) return;
if (msg.type !== 0) return;
if (!msg.content) return;