diff --git a/discord.11.4-dev.js b/discord.11.4-dev.js index a75eae78..329e28d7 100644 --- a/discord.11.4-dev.js +++ b/discord.11.4-dev.js @@ -1588,7 +1588,7 @@ eval("const TextBasedChannel = __webpack_require__(/*! ./interfaces/TextBasedCha /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { -eval("const PartialGuild = __webpack_require__(/*! ./PartialGuild */ \"./src/structures/PartialGuild.js\");\nconst PartialGuildChannel = __webpack_require__(/*! ./PartialGuildChannel */ \"./src/structures/PartialGuildChannel.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\n\n/**\n * Represents an invitation to a guild channel.\n * The only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.\n */\nclass Invite {\n constructor(client, data) {\n /**\n * The client that instantiated the invite\n * @name Invite#client\n * @type {Client}\n * @readonly\n */\n Object.defineProperty(this, 'client', { value: client });\n\n this.setup(data);\n }\n\n setup(data) {\n /**\n * The guild the invite is for. If this guild is already known, this will be a guild object. If the guild is\n * unknown, this will be a PartialGuild object\n * @type {Guild|PartialGuild}\n */\n this.guild = this.client.guilds.get(data.guild.id) || new PartialGuild(this.client, data.guild);\n\n /**\n * The code for this invite\n * @type {string}\n */\n this.code = data.code;\n\n /**\n * The approximate number of online members of the guild this invite is for\n * @type {number}\n */\n this.presenceCount = data.approximate_presence_count;\n\n /**\n * The approximate total number of members of the guild this invite is for\n * @type {number}\n */\n this.memberCount = data.approximate_member_count;\n\n /**\n * The number of text channels the guild this invite goes to has\n * @type {number}\n */\n this.textChannelCount = data.guild.text_channel_count;\n\n /**\n * The number of voice channels the guild this invite goes to has\n * @type {number}\n */\n this.voiceChannelCount = data.guild.voice_channel_count;\n\n /**\n * Whether or not this invite is temporary\n * @type {boolean}\n */\n this.temporary = data.temporary;\n\n /**\n * The maximum age of the invite, in seconds\n * @type {?number}\n */\n this.maxAge = data.max_age;\n\n /**\n * How many times this invite has been used\n * @type {number}\n */\n this.uses = data.uses;\n\n /**\n * The maximum uses of this invite\n * @type {number}\n */\n this.maxUses = data.max_uses;\n\n if (data.inviter) {\n /**\n * The user who created this invite\n * @type {?User}\n */\n this.inviter = this.client.dataManager.newUser(data.inviter);\n }\n\n /**\n * The channel the invite is for. If this channel is already known, this will be a GuildChannel object.\n * If the channel is unknown, this will be a PartialGuildChannel object.\n * @type {GuildChannel|PartialGuildChannel}\n */\n this.channel = this.client.channels.get(data.channel.id) || new PartialGuildChannel(this.client, data.channel);\n\n /**\n * The timestamp the invite was created at\n * @type {number}\n */\n this.createdTimestamp = new Date(data.created_at).getTime();\n }\n\n /**\n * The time the invite was created\n * @type {Date}\n * @readonly\n */\n get createdAt() {\n return new Date(this.createdTimestamp);\n }\n\n /**\n * The timestamp the invite will expire at\n * @type {number}\n * @readonly\n */\n get expiresTimestamp() {\n return this.createdTimestamp + (this.maxAge * 1000);\n }\n\n /**\n * The time the invite will expire\n * @type {Date}\n * @readonly\n */\n get expiresAt() {\n return new Date(this.expiresTimestamp);\n }\n\n /**\n * The URL to the invite\n * @type {string}\n * @readonly\n */\n get url() {\n return Constants.Endpoints.inviteLink(this.code);\n }\n\n /**\n * Deletes this invite.\n * @param {string} [reason] Reason for deleting this invite\n * @returns {Promise}\n */\n delete(reason) {\n return this.client.rest.methods.deleteInvite(this, reason);\n }\n\n /**\n * When concatenated with a string, this automatically concatenates the invite's URL instead of the object.\n * @returns {string}\n * @example\n * // Logs: Invite: https://discord.gg/A1b2C3\n * console.log(`Invite: ${invite}`);\n */\n toString() {\n return this.url;\n }\n}\n\nmodule.exports = Invite;\n\n\n//# sourceURL=webpack:///./src/structures/Invite.js?"); +eval("const PartialGuild = __webpack_require__(/*! ./PartialGuild */ \"./src/structures/PartialGuild.js\");\nconst PartialGuildChannel = __webpack_require__(/*! ./PartialGuildChannel */ \"./src/structures/PartialGuildChannel.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\n\n/**\n * Represents an invitation to a guild channel.\n * The only guaranteed properties are `code`, `url`, `guild`, and `channel`.\n * Other properties can be missing.\n */\nclass Invite {\n constructor(client, data) {\n /**\n * The client that instantiated the invite\n * @name Invite#client\n * @type {Client}\n * @readonly\n */\n Object.defineProperty(this, 'client', { value: client });\n\n this.setup(data);\n }\n\n setup(data) {\n /**\n * The guild the invite is for. If this guild is already known, this will be a guild object. If the guild is\n * unknown, this will be a PartialGuild object\n * @type {Guild|PartialGuild}\n */\n this.guild = this.client.guilds.get(data.guild.id) || new PartialGuild(this.client, data.guild);\n\n /**\n * The code for this invite\n * @type {string}\n */\n this.code = data.code;\n\n /**\n * The approximate number of online members of the guild this invite is for\n * @type {number}\n */\n this.presenceCount = data.approximate_presence_count;\n\n /**\n * The approximate total number of members of the guild this invite is for\n * @type {number}\n */\n this.memberCount = data.approximate_member_count;\n\n /**\n * The number of text channels the guild this invite goes to has\n * @type {number}\n */\n this.textChannelCount = data.guild.text_channel_count;\n\n /**\n * The number of voice channels the guild this invite goes to has\n * @type {number}\n */\n this.voiceChannelCount = data.guild.voice_channel_count;\n\n /**\n * Whether or not this invite is temporary\n * @type {boolean}\n */\n this.temporary = data.temporary;\n\n /**\n * The maximum age of the invite, in seconds\n * @type {?number}\n */\n this.maxAge = data.max_age;\n\n /**\n * How many times this invite has been used\n * @type {number}\n */\n this.uses = data.uses;\n\n /**\n * The maximum uses of this invite\n * @type {number}\n */\n this.maxUses = data.max_uses;\n\n if (data.inviter) {\n /**\n * The user who created this invite\n * @type {?User}\n */\n this.inviter = this.client.dataManager.newUser(data.inviter);\n }\n\n /**\n * The channel the invite is for. If this channel is already known, this will be a GuildChannel object.\n * If the channel is unknown, this will be a PartialGuildChannel object.\n * @type {GuildChannel|PartialGuildChannel}\n */\n this.channel = this.client.channels.get(data.channel.id) || new PartialGuildChannel(this.client, data.channel);\n\n /**\n * The timestamp the invite was created at\n * @type {number}\n */\n this.createdTimestamp = new Date(data.created_at).getTime();\n }\n\n /**\n * The time the invite was created\n * @type {Date}\n * @readonly\n */\n get createdAt() {\n return new Date(this.createdTimestamp);\n }\n\n /**\n * The timestamp the invite will expire at\n * @type {number}\n * @readonly\n */\n get expiresTimestamp() {\n return this.createdTimestamp + (this.maxAge * 1000);\n }\n\n /**\n * The time the invite will expire\n * @type {Date}\n * @readonly\n */\n get expiresAt() {\n return new Date(this.expiresTimestamp);\n }\n\n /**\n * The URL to the invite\n * @type {string}\n * @readonly\n */\n get url() {\n return Constants.Endpoints.inviteLink(this.code);\n }\n\n /**\n * Deletes this invite.\n * @param {string} [reason] Reason for deleting this invite\n * @returns {Promise}\n */\n delete(reason) {\n return this.client.rest.methods.deleteInvite(this, reason);\n }\n\n /**\n * When concatenated with a string, this automatically concatenates the invite's URL instead of the object.\n * @returns {string}\n * @example\n * // Logs: Invite: https://discord.gg/A1b2C3\n * console.log(`Invite: ${invite}`);\n */\n toString() {\n return this.url;\n }\n}\n\nmodule.exports = Invite;\n\n\n//# sourceURL=webpack:///./src/structures/Invite.js?"); /***/ }),