feat: Add "deleted" property to multiple structures. (#2556)

* Add "deleted" property to "Message" structure

* Add "deleted" property to Multiple structures

Structures edited:
- Channel
- Emoji
- Guild
- Guild Member
- Role

* Update "deletable" getter

* Fix ESLint "no-trailing-spaces" errors

* Requested Change: Mark w/ bulkDelete
This commit is contained in:
Braxton
2018-05-28 18:42:51 -04:00
committed by Isabella
parent 27fcb64187
commit f0c4d0e834
13 changed files with 45 additions and 2 deletions

View File

@@ -157,6 +157,12 @@ class Message extends Base {
* @private
*/
this._edits = [];
/**
* Whether this message has been deleted
* @type {boolean}
*/
this.deleted = false;
}
/**
@@ -341,9 +347,9 @@ class Message extends Base {
* @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)
);
));
}
/**