more fixes

This commit is contained in:
Erik 2022-05-10 00:06:01 +03:00
parent e1dd3f1513
commit 61015c0e3a
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -398,7 +398,8 @@ module.exports = class AutoModeration extends Observer {
this.logger.error('Error in message flag:\n' + err.stack);
});
await this.client.storageManager.mongodb.wordwatcher.insertOne({
// Only insert if actions are defined
if(actionRow) await this.client.storageManager.mongodb.wordwatcher.insertOne({
message: sent.id,
target: msg.id,
channel: msg.channel.id,