backport: deleted property

This commit is contained in:
Lewdcario
2018-06-29 19:11:50 -05:00
parent 72346fb47e
commit 3fa9ed1f42
13 changed files with 45 additions and 2 deletions

View File

@@ -29,6 +29,12 @@ class Message {
*/
this.channel = channel;
/**
* Whether this message has been deleted
* @type {boolean}
*/
this.deleted = false;
if (data) this.setup(data);
}
@@ -319,9 +325,9 @@ class Message {
* @readonly
*/
get deletable() {
return this.author.id === this.client.user.id || (this.guild &&
return !this.deleted && (this.author.id === this.client.user.id || (this.guild &&
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES)
);
));
}
/**