mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Overhaul Permissions utilities (EvaluatedPermissions no more)
This commit is contained in:
@@ -4,6 +4,7 @@ const MessageReaction = require('./MessageReaction');
|
||||
const Util = require('../util/Util');
|
||||
const Collection = require('../util/Collection');
|
||||
const Constants = require('../util/Constants');
|
||||
const Permissions = require('../util/Permissions');
|
||||
let GuildMember;
|
||||
|
||||
/**
|
||||
@@ -334,7 +335,7 @@ class Message {
|
||||
*/
|
||||
get deletable() {
|
||||
return this.author.id === this.client.user.id || (this.guild &&
|
||||
this.channel.permissionsFor(this.client.user).hasPermission(Constants.PermissionFlags.MANAGE_MESSAGES)
|
||||
this.channel.permissionsFor(this.client.user).hasPermission(Permissions.FLAGS.MANAGE_MESSAGES)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -345,7 +346,7 @@ class Message {
|
||||
*/
|
||||
get pinnable() {
|
||||
return !this.guild ||
|
||||
this.channel.permissionsFor(this.client.user).hasPermission(Constants.PermissionFlags.MANAGE_MESSAGES);
|
||||
this.channel.permissionsFor(this.client.user).hasPermission(Permissions.FLAGS.MANAGE_MESSAGES);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user