Fix permission checking for Administrator channel overwrites (#2756)

This commit is contained in:
bdistin
2018-08-17 02:46:09 -05:00
committed by Amish Shah
parent 3f81b613d8
commit d437cecb3f
3 changed files with 9 additions and 9 deletions

View File

@@ -335,7 +335,7 @@ class Message extends Base {
*/
get deletable() {
return !this.deleted && (this.author.id === this.client.user.id || (this.guild &&
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES)
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES, false)
));
}
@@ -346,7 +346,7 @@ class Message extends Base {
*/
get pinnable() {
return !this.guild ||
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES);
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES, false);
}
/**