diff --git a/discord.11.5-dev.js b/discord.11.5-dev.js index 89b27677..51077a52 100644 --- a/discord.11.5-dev.js +++ b/discord.11.5-dev.js @@ -2070,7 +2070,7 @@ eval("/* WEBPACK VAR INJECTION */(function(process) {exports.Package = __webpack /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { -eval("const BitField = __webpack_require__(/*! ./BitField */ \"./src/util/BitField.js\");\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * Data structure that makes it easy to interact with a permission bitfield. All {@link GuildMember}s have a set of\n * permissions in their guild, and each channel in the guild may also have {@link PermissionOverwrites} for the member\n * that override their default permissions.\n * @extends {BitField}\n */\nclass Permissions extends BitField {\n /**\n * @param {GuildMember} [member] Member the permissions are for **(deprecated)**\n * @param {number|PermissionResolvable} permissions Permissions or bitfield to read from\n */\n constructor(member, permissions) {\n super(typeof member === 'object' && !(member instanceof Array) ? permissions : member);\n\n Object.defineProperty(this, '_member', {\n writable: true,\n value: typeof member === 'object' && !(member instanceof Array) ? member : null,\n });\n }\n\n /**\n * Member the permissions are for\n * @type {GuildMember}\n * @deprecated\n */\n get member() {\n return this._member;\n }\n\n set member(value) {\n this._member = value;\n }\n\n /**\n * Bitfield of the packed permissions\n * @type {number}\n * @see {@link Permissions#bitfield}\n * @deprecated\n * @readonly\n */\n get raw() {\n return this.bitfield;\n }\n\n set raw(raw) {\n this.bitfield = raw;\n }\n\n /**\n * Checks whether the bitfield has a permission, or any of multiple permissions.\n * @param {PermissionResolvable} permission Permission(s) to check for\n * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override\n * @returns {boolean}\n */\n any(permission, checkAdmin = true) {\n return (checkAdmin && super.has(this.constructor.FLAGS.ADMINISTRATOR)) || super.any(permission);\n }\n\n /**\n * Checks whether the bitfield has a permission, or multiple permissions.\n * @param {PermissionResolvable} permission Permission(s) to check for\n * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override\n * @returns {boolean}\n */\n has(permission, checkAdmin = true) {\n return (checkAdmin && super.has(this.constructor.FLAGS.ADMINISTRATOR)) || super.has(permission);\n }\n\n /**\n * Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.\n * @param {PermissionResolvable} permission The permission to check for\n * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permission\n * @returns {boolean}\n * @see {@link Permissions#has}\n * @deprecated\n */\n hasPermission(permission, explicit = false) {\n return this.has(permission, !explicit);\n }\n\n /**\n * Checks whether the user has all specified permissions.\n * @param {PermissionResolvable} permissions The permissions to check for\n * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permissions\n * @returns {boolean}\n * @see {@link Permissions#has}\n * @deprecated\n */\n hasPermissions(permissions, explicit = false) {\n return this.has(permissions, !explicit);\n }\n\n /**\n * Checks whether the user has all specified permissions, and lists any missing permissions.\n * @param {PermissionResolvable} permissions The permissions to check for\n * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permissions\n * @returns {PermissionResolvable}\n * @see {@link Permissions#missing}\n * @deprecated\n */\n missingPermissions(permissions, explicit = false) {\n return this.missing(permissions, !explicit);\n }\n\n /**\n * Data that can be resolved to give a permission number. This can be:\n * * A string (see {@link Permissions.FLAGS})\n * * A permission number\n * @typedef {string|number|Permissions|PermissionResolvable[]} PermissionResolvable\n */\n}\n\n/**\n * Numeric permission flags. All available properties:\n * - `ADMINISTRATOR` (implicitly has *all* permissions, and bypasses all channel overwrites)\n * - `CREATE_INSTANT_INVITE` (create invitations to the guild)\n * - `KICK_MEMBERS`\n * - `BAN_MEMBERS`\n * - `MANAGE_CHANNELS` (edit and reorder channels)\n * - `MANAGE_GUILD` (edit the guild information, region, etc.)\n * - `ADD_REACTIONS` (add new reactions to messages)\n * - `VIEW_AUDIT_LOG`\n * - `PRIORITY_SPEAKER`\n * - `STREAM`\n * - `VIEW_CHANNEL`\n * - `READ_MESSAGES` **(deprecated)**\n * - `SEND_MESSAGES`\n * - `SEND_TTS_MESSAGES`\n * - `MANAGE_MESSAGES` (delete messages and reactions)\n * - `EMBED_LINKS` (links posted will have a preview embedded)\n * - `ATTACH_FILES`\n * - `READ_MESSAGE_HISTORY` (view messages that were posted prior to opening Discord)\n * - `MENTION_EVERYONE`\n * - `USE_EXTERNAL_EMOJIS` (use emojis from different guilds)\n * - `EXTERNAL_EMOJIS` **(deprecated)**\n * - `CONNECT` (connect to a voice channel)\n * - `SPEAK` (speak in a voice channel)\n * - `MUTE_MEMBERS` (mute members across all voice channels)\n * - `DEAFEN_MEMBERS` (deafen members across all voice channels)\n * - `MOVE_MEMBERS` (move members between voice channels)\n * - `USE_VAD` (use voice activity detection)\n * - `CHANGE_NICKNAME`\n * - `MANAGE_NICKNAMES` (change other members' nicknames)\n * - `MANAGE_ROLES`\n * - `MANAGE_ROLES_OR_PERMISSIONS` **(deprecated)**\n * - `MANAGE_WEBHOOKS`\n * - `MANAGE_EMOJIS`\n * @type {Object}\n * @see {@link https://discordapp.com/developers/docs/topics/permissions}\n */\nPermissions.FLAGS = {\n CREATE_INSTANT_INVITE: 1 << 0,\n KICK_MEMBERS: 1 << 1,\n BAN_MEMBERS: 1 << 2,\n ADMINISTRATOR: 1 << 3,\n MANAGE_CHANNELS: 1 << 4,\n MANAGE_GUILD: 1 << 5,\n ADD_REACTIONS: 1 << 6,\n VIEW_AUDIT_LOG: 1 << 7,\n PRIORITY_SPEAKER: 1 << 8,\n STREAM: 1 << 9,\n\n VIEW_CHANNEL: 1 << 10,\n READ_MESSAGES: 1 << 10,\n SEND_MESSAGES: 1 << 11,\n SEND_TTS_MESSAGES: 1 << 12,\n MANAGE_MESSAGES: 1 << 13,\n EMBED_LINKS: 1 << 14,\n ATTACH_FILES: 1 << 15,\n READ_MESSAGE_HISTORY: 1 << 16,\n MENTION_EVERYONE: 1 << 17,\n EXTERNAL_EMOJIS: 1 << 18,\n USE_EXTERNAL_EMOJIS: 1 << 18,\n\n CONNECT: 1 << 20,\n SPEAK: 1 << 21,\n MUTE_MEMBERS: 1 << 22,\n DEAFEN_MEMBERS: 1 << 23,\n MOVE_MEMBERS: 1 << 24,\n USE_VAD: 1 << 25,\n\n CHANGE_NICKNAME: 1 << 26,\n MANAGE_NICKNAMES: 1 << 27,\n MANAGE_ROLES: 1 << 28,\n MANAGE_ROLES_OR_PERMISSIONS: 1 << 28,\n MANAGE_WEBHOOKS: 1 << 29,\n MANAGE_EMOJIS: 1 << 30,\n};\n\n/**\n * Bitfield representing every permission combined\n * @type {number}\n */\nPermissions.ALL = Object.keys(Permissions.FLAGS).reduce((all, p) => all | Permissions.FLAGS[p], 0);\n\n/**\n * Bitfield representing the default permissions for users\n * @type {number}\n */\nPermissions.DEFAULT = 104324673;\n\n/**\n * @class EvaluatedPermissions\n * @classdesc The final evaluated permissions for a member in a channel\n * @see {@link Permissions}\n * @deprecated\n */\n\nPermissions.prototype.hasPermission = util.deprecate(Permissions.prototype.hasPermission,\n 'EvaluatedPermissions#hasPermission is deprecated, use Permissions#has instead');\nPermissions.prototype.hasPermissions = util.deprecate(Permissions.prototype.hasPermissions,\n 'EvaluatedPermissions#hasPermissions is deprecated, use Permissions#has instead');\nPermissions.prototype.missingPermissions = util.deprecate(Permissions.prototype.missingPermissions,\n 'EvaluatedPermissions#missingPermissions is deprecated, use Permissions#missing instead');\nObject.defineProperty(Permissions.prototype, 'raw', {\n get: util\n .deprecate(Object.getOwnPropertyDescriptor(Permissions.prototype, 'raw').get,\n 'EvaluatedPermissions#raw is deprecated use Permissions#bitfield instead'),\n set: util.deprecate(Object.getOwnPropertyDescriptor(Permissions.prototype, 'raw').set,\n 'EvaluatedPermissions#raw is deprecated use Permissions#bitfield instead'),\n});\nObject.defineProperty(Permissions.prototype, 'member', {\n get: util\n .deprecate(Object.getOwnPropertyDescriptor(Permissions.prototype, 'member').get,\n 'EvaluatedPermissions#member is deprecated'),\n set: util\n .deprecate(Object.getOwnPropertyDescriptor(Permissions.prototype, 'member').set,\n 'EvaluatedPermissions#member is deprecated'),\n});\n\nmodule.exports = Permissions;\n\n\n//# sourceURL=webpack:///./src/util/Permissions.js?"); +eval("const BitField = __webpack_require__(/*! ./BitField */ \"./src/util/BitField.js\");\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * Data structure that makes it easy to interact with a permission bitfield. All {@link GuildMember}s have a set of\n * permissions in their guild, and each channel in the guild may also have {@link PermissionOverwrites} for the member\n * that override their default permissions.\n * @extends {BitField}\n */\nclass Permissions extends BitField {\n /**\n * @param {GuildMember} [member] Member the permissions are for **(deprecated)**\n * @param {number|PermissionResolvable} permissions Permissions or bitfield to read from\n */\n constructor(member, permissions) {\n super(typeof member === 'object' && !(member instanceof Array) ? permissions : member);\n\n Object.defineProperty(this, '_member', {\n writable: true,\n value: typeof member === 'object' && !(member instanceof Array) ? member : null,\n });\n }\n\n /**\n * Member the permissions are for\n * @type {GuildMember}\n * @deprecated\n */\n get member() {\n return this._member;\n }\n\n set member(value) {\n this._member = value;\n }\n\n /**\n * Bitfield of the packed permissions\n * @type {number}\n * @see {@link Permissions#bitfield}\n * @deprecated\n * @readonly\n */\n get raw() {\n return this.bitfield;\n }\n\n set raw(raw) {\n this.bitfield = raw;\n }\n\n /**\n * Checks whether the bitfield has a permission, or any of multiple permissions.\n * @param {PermissionResolvable} permission Permission(s) to check for\n * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override\n * @returns {boolean}\n */\n any(permission, checkAdmin = true) {\n return (checkAdmin && super.has(this.constructor.FLAGS.ADMINISTRATOR)) || super.any(permission);\n }\n\n /**\n * Checks whether the bitfield has a permission, or multiple permissions.\n * @param {PermissionResolvable} permission Permission(s) to check for\n * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override\n * @returns {boolean}\n */\n has(permission, checkAdmin = true) {\n return (checkAdmin && super.has(this.constructor.FLAGS.ADMINISTRATOR)) || super.has(permission);\n }\n\n /**\n * Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.\n * @param {PermissionResolvable} permission The permission to check for\n * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permission\n * @returns {boolean}\n * @see {@link Permissions#has}\n * @deprecated\n */\n hasPermission(permission, explicit = false) {\n return this.has(permission, !explicit);\n }\n\n /**\n * Checks whether the user has all specified permissions.\n * @param {PermissionResolvable} permissions The permissions to check for\n * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permissions\n * @returns {boolean}\n * @see {@link Permissions#has}\n * @deprecated\n */\n hasPermissions(permissions, explicit = false) {\n return this.has(permissions, !explicit);\n }\n\n /**\n * Checks whether the user has all specified permissions, and lists any missing permissions.\n * @param {PermissionResolvable} permissions The permissions to check for\n * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permissions\n * @returns {PermissionResolvable}\n * @see {@link Permissions#missing}\n * @deprecated\n */\n missingPermissions(permissions, explicit = false) {\n return this.missing(permissions, !explicit);\n }\n}\n\n/**\n * Data that can be resolved to give a permission number. This can be:\n * * A string (see {@link Permissions.FLAGS})\n * * A permission number\n * @typedef {string|number|Permissions|PermissionResolvable[]} PermissionResolvable\n */\n\n/**\n * Numeric permission flags. All available properties:\n * - `ADMINISTRATOR` (implicitly has *all* permissions, and bypasses all channel overwrites)\n * - `CREATE_INSTANT_INVITE` (create invitations to the guild)\n * - `KICK_MEMBERS`\n * - `BAN_MEMBERS`\n * - `MANAGE_CHANNELS` (edit and reorder channels)\n * - `MANAGE_GUILD` (edit the guild information, region, etc.)\n * - `ADD_REACTIONS` (add new reactions to messages)\n * - `VIEW_AUDIT_LOG`\n * - `PRIORITY_SPEAKER`\n * - `STREAM`\n * - `VIEW_CHANNEL`\n * - `READ_MESSAGES` **(deprecated)**\n * - `SEND_MESSAGES`\n * - `SEND_TTS_MESSAGES`\n * - `MANAGE_MESSAGES` (delete messages and reactions)\n * - `EMBED_LINKS` (links posted will have a preview embedded)\n * - `ATTACH_FILES`\n * - `READ_MESSAGE_HISTORY` (view messages that were posted prior to opening Discord)\n * - `MENTION_EVERYONE`\n * - `USE_EXTERNAL_EMOJIS` (use emojis from different guilds)\n * - `EXTERNAL_EMOJIS` **(deprecated)**\n * - `CONNECT` (connect to a voice channel)\n * - `SPEAK` (speak in a voice channel)\n * - `MUTE_MEMBERS` (mute members across all voice channels)\n * - `DEAFEN_MEMBERS` (deafen members across all voice channels)\n * - `MOVE_MEMBERS` (move members between voice channels)\n * - `USE_VAD` (use voice activity detection)\n * - `CHANGE_NICKNAME`\n * - `MANAGE_NICKNAMES` (change other members' nicknames)\n * - `MANAGE_ROLES`\n * - `MANAGE_ROLES_OR_PERMISSIONS` **(deprecated)**\n * - `MANAGE_WEBHOOKS`\n * - `MANAGE_EMOJIS`\n * @type {Object}\n * @see {@link https://discordapp.com/developers/docs/topics/permissions}\n */\nPermissions.FLAGS = {\n CREATE_INSTANT_INVITE: 1 << 0,\n KICK_MEMBERS: 1 << 1,\n BAN_MEMBERS: 1 << 2,\n ADMINISTRATOR: 1 << 3,\n MANAGE_CHANNELS: 1 << 4,\n MANAGE_GUILD: 1 << 5,\n ADD_REACTIONS: 1 << 6,\n VIEW_AUDIT_LOG: 1 << 7,\n PRIORITY_SPEAKER: 1 << 8,\n STREAM: 1 << 9,\n\n VIEW_CHANNEL: 1 << 10,\n READ_MESSAGES: 1 << 10,\n SEND_MESSAGES: 1 << 11,\n SEND_TTS_MESSAGES: 1 << 12,\n MANAGE_MESSAGES: 1 << 13,\n EMBED_LINKS: 1 << 14,\n ATTACH_FILES: 1 << 15,\n READ_MESSAGE_HISTORY: 1 << 16,\n MENTION_EVERYONE: 1 << 17,\n EXTERNAL_EMOJIS: 1 << 18,\n USE_EXTERNAL_EMOJIS: 1 << 18,\n\n CONNECT: 1 << 20,\n SPEAK: 1 << 21,\n MUTE_MEMBERS: 1 << 22,\n DEAFEN_MEMBERS: 1 << 23,\n MOVE_MEMBERS: 1 << 24,\n USE_VAD: 1 << 25,\n\n CHANGE_NICKNAME: 1 << 26,\n MANAGE_NICKNAMES: 1 << 27,\n MANAGE_ROLES: 1 << 28,\n MANAGE_ROLES_OR_PERMISSIONS: 1 << 28,\n MANAGE_WEBHOOKS: 1 << 29,\n MANAGE_EMOJIS: 1 << 30,\n};\n\n/**\n * Bitfield representing every permission combined\n * @type {number}\n */\nPermissions.ALL = Object.keys(Permissions.FLAGS).reduce((all, p) => all | Permissions.FLAGS[p], 0);\n\n/**\n * Bitfield representing the default permissions for users\n * @type {number}\n */\nPermissions.DEFAULT = 104324673;\n\n/**\n * @class EvaluatedPermissions\n * @classdesc The final evaluated permissions for a member in a channel\n * @see {@link Permissions}\n * @deprecated\n */\n\nPermissions.prototype.hasPermission = util.deprecate(Permissions.prototype.hasPermission,\n 'EvaluatedPermissions#hasPermission is deprecated, use Permissions#has instead');\nPermissions.prototype.hasPermissions = util.deprecate(Permissions.prototype.hasPermissions,\n 'EvaluatedPermissions#hasPermissions is deprecated, use Permissions#has instead');\nPermissions.prototype.missingPermissions = util.deprecate(Permissions.prototype.missingPermissions,\n 'EvaluatedPermissions#missingPermissions is deprecated, use Permissions#missing instead');\nObject.defineProperty(Permissions.prototype, 'raw', {\n get: util\n .deprecate(Object.getOwnPropertyDescriptor(Permissions.prototype, 'raw').get,\n 'EvaluatedPermissions#raw is deprecated use Permissions#bitfield instead'),\n set: util.deprecate(Object.getOwnPropertyDescriptor(Permissions.prototype, 'raw').set,\n 'EvaluatedPermissions#raw is deprecated use Permissions#bitfield instead'),\n});\nObject.defineProperty(Permissions.prototype, 'member', {\n get: util\n .deprecate(Object.getOwnPropertyDescriptor(Permissions.prototype, 'member').get,\n 'EvaluatedPermissions#member is deprecated'),\n set: util\n .deprecate(Object.getOwnPropertyDescriptor(Permissions.prototype, 'member').set,\n 'EvaluatedPermissions#member is deprecated'),\n});\n\nmodule.exports = Permissions;\n\n\n//# sourceURL=webpack:///./src/util/Permissions.js?"); /***/ }),