3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 07:35:02 +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 29a229ba49
commit 44792a824b
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;