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

SavedMessages: don't emit message deletion events for non-saved messages

This commit is contained in:
Dragory 2018-12-22 14:37:41 +02:00
parent edf36ebcf4
commit 77a0cc8397

View file

@ -177,8 +177,11 @@ export class GuildSavedMessages extends BaseRepository {
.execute();
const deleted = await this.messages.findOne(id);
if (deleted) {
this.events.emit("delete", [deleted]);
}
}
/**
* Marks the specified messages as deleted in the database (if they weren't already marked before).