Remove all deprecated methods / props

This commit is contained in:
Crawl
2017-05-14 20:15:55 +02:00
parent 4422f2aa8a
commit ca926ee404
11 changed files with 3 additions and 317 deletions

View File

@@ -3,7 +3,6 @@ const Role = require('./Role');
const Permissions = require('../util/Permissions');
const Collection = require('../util/Collection');
const Presence = require('./Presence').Presence;
const util = require('util');
/**
* Represents a member of a guild on Discord.
@@ -310,18 +309,6 @@ class GuildMember {
return this.roles.some(r => r.hasPermission(permission, undefined, checkAdmin));
}
/**
* Checks whether the roles of the member allows them to perform specific actions.
* @param {PermissionResolvable[]} permissions The permissions to check for
* @param {boolean} [explicit=false] Whether to require the member to explicitly have the exact permissions
* @returns {boolean}
* @deprecated
*/
hasPermissions(permissions, explicit = false) {
if (!explicit && this.user.id === this.guild.ownerID) return true;
return this.hasPermission(permissions, explicit);
}
/**
* Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.
* @param {PermissionResolvable[]} permissions The permissions to check for
@@ -509,15 +496,8 @@ class GuildMember {
// These are here only for documentation purposes - they are implemented by TextBasedChannel
/* eslint-disable no-empty-function */
send() {}
sendMessage() {}
sendEmbed() {}
sendFile() {}
sendCode() {}
}
TextBasedChannel.applyToClass(GuildMember);
GuildMember.prototype.hasPermissions = util.deprecate(GuildMember.prototype.hasPermissions,
'GuildMember#hasPermissions is deprecated - use GuildMember#hasPermission, it now takes an array');
module.exports = GuildMember;